<?php
namespace app\admin\validate;
use think\Validate;
use think\Db;
class Editusercustom extends Validate
{
    // 验证规则
    protected $rule = [
        'tuid'=>'require',
        'emaill'=>'require|max:50',
        'phone'=>'require|max:50'
    ];
	
    //错误信息
    protected $message  = [
        'tuid.require'                 => 'id必填',
        'emaill.require'                 => 'emaill必填',
        'phone.require'                 => 'phone必填',       
        'emaill.max'                     => 'emaill小于50字符',
        'phone.unique'                  => 'phone小于50字符'
    ];
	
	public function setRule($r){
		$this->rule = $r;
	}
	
    /**
     * 该活动是否可以编辑
     * @param $value|验证数据
     * @param $rule|验证规则
     * @param $data|全部数据
     * @return bool|string
     */
    protected function checkId($value, $rule ,$data)
    {
        return true;
    }
}